package com.changcheng.project.yuminsi.enums;

/**
 * @author yuminsi
 * @description
 * @date 2020/9/18 15:25
 * @since
 */
public enum EnterpriseIdEnum {
    /**
     *
     */
    ENTERPRISE_ID_XDZN("XDZN","仙豆"),
    /**
     *
     */
    ENTERPRISE_ID_CC01("CC01","长城");
    private String code;
    private String name;

    EnterpriseIdEnum() {
    }

    EnterpriseIdEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static EnterpriseIdEnum getEnterpriseId(String code){
        for (EnterpriseIdEnum enterpriseId : values()){
            if (enterpriseId.getCode().equals(code)){
                return enterpriseId;
            }
        }
        return null;
    }
}
